package com.lei.retrofitlibrary.http.observ;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/11 16:16
 * @Description : 文件描述
 */
public class BaseObservable {
    public <T> void doIt(Observable<T> observable, BaseObserver<T> observer){
        observable
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }
}
